package demo1;

public class Login {
    private String name;
    private String keyword;

    public Login(String name, String keyword) {
        this.name = name;
        this.keyword = keyword;
    }

    public void LoginImfo(String name, String keyword)throws  UserKeywordException,UserNameException{
        if(this.keyword.equals(keyword)==false){
            throw new UserNameException();
        }
        if(this.name.equals(name)==false){
            throw new UserKeywordException();
        }
        System.out.println("succeeded");
    }
}
